﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Entity;

namespace DataAccess
{
    public partial class StoredProcedures
    {
        public Document DocumentGetById(int id)
        {
            var cmd = _db.CreateCommand("Documents_GetById", true);
            _db.AddParameter(cmd, "Id", DbType.Int32, id);
            var documents = GetList<Document>(cmd);
            return documents == null ? null : documents.FirstOrDefault();
        }

    }
}
